<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
	<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
	<title>我的贴子</title>
	<link rel="icon" href="">
	<link rel="stylesheet" type="text/css" href="/static/css/aui.css" />
	<link rel="stylesheet" type="text/css" href="/static/css/aui-slide.css" />
    <style type="text/css">
    .hw-overlay{display:none; position: fixed; top:0;left:0;width:100%;height:100%; background-color: rgba(0,0,0,0.3);z-index:10;} 
    .hw-layer-wrap{box-sizing:border-box; width:570px; position:absolute;left:50%;top:50%; margin-left:-285px; border-radius:3px; background-color:#fff; box-shadow:1px 2px 4px 0 rgba(0,0,0,0.12); padding:45px 50px;} 
    .hwLayer-close{position:absolute; right:20px; top:20px; width:20px; height:20px; cursor:pointer; font-size:20px; color:#ccc;} 
    .hw-layer-wrap .hw-icon{color:#b4d8f3;font-size:86px;text-align:center;}
    .hw-layer-wrap h4{margin:5px 0 30px; font-size:24px; color:#383c3e;} 
    .hw-layer-wrap p{margin:30px 0; line-height:22px; color:#595d60; text-align:left;} 
     
    @media (max-width:768px){ 
        .hw-layer-wrap{width:350px; margin-left:-175px; margin-top:-200px; padding:20px 0px; text-align:center;} 
    } 
    @media (max-width:400px){ 
        .hw-layer-wrap{width:250px; margin-left:-125px;padding:20px 0px;} 
    }
    </style>
</head>
<body>
	<header class="aui-bar aui-bar-nav aui-margin-b-15" id="header" style="background-color: #27AE60;padding-top:12px; ">
        <a class="aui-pull-left aui-btn" href="{% url 'mycampus:user'  %}">
            <span class="aui-iconfont aui-icon-left"></span>
        </a>
        <div class="aui-title">
            <div class="aui-bar aui-bar-btn aui-bar-btn-round">
                <div class="aui-bar-btn-item aui-active love1 active" tapmode="" data-item-order="0">新闻</div>
                <div  class="aui-bar-btn-item love2" tapmode="" data-item-order="1" >研讨</div>
            </div>
        </div>
        <a class="btn aui-btn aui-pull-right show-layer" data-show-layer="hw-layer" role="button">
            <span class="aui-iconfont aui-icon-plus"></span>
        </a>
      
    </header>

	<!-- new -->
	<section class="aui-content" id="lovewall" >
        <div class="aui-list-item-right">我的新闻贴:共{{ mynewscount }}贴</div>
         <ul class="aui-list aui-media-list">
        {% for mynew in mynews %}
            {% if mynew.images %}
            <form role="form"   method="post" enctype="multipart/form-data" >
            <li class="aui-list-item" >
                <div class="aui-media-list-item-inner"  >
                    <div class="aui-list-item-media">
                        <img src="/static/{{mynew.images}}">
                    </div>
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-text">
                            <div class="aui-list-item-title" style="color:#4c5276">{{mynew.publisher}}</div>
                        </div>
                        <div class="aui-list-item-text" style="color:#333;">
                            {{mynew.title}}
                        </div>
                        <div class="aui-info aui-font-size-12 aui-padded-t-0 aui-padded-b-0">
                            <div class="aui-info-item" name="time">{{mynew.time|date:"Y-m-d H:i"}}</div>
                            <div class="aui-info-item">
                                <i class="aui-iconfont aui-icon-comment" style="color:#4c5276">
                                <a  href="{% url 'mycampus:delete_mynew' mynew.id %}" style="color: #000">
                                删除
                                </a>
                                </i>
                            </div>
                        </div>
                    </div>
                </div>
            </li>
            </form>
            {% else %}
            <form role="form"   method="post" enctype="multipart/form-data" >
            <li class="aui-list-item" >
                <div class="aui-media-list-item-inner"  >
                    <div class="aui-list-item-media">
                        <!-- <img src="/static/{{mynew.images}}"> -->
                    </div>
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-text">
                            <div class="aui-list-item-title" style="color:#4c5276">{{mynew.publisher}}</div>
                        </div>
                        <div class="aui-list-item-text" style="color:#333;">
                            {{mynew.title}}
                        </div>
                        <div class="aui-info aui-font-size-12 aui-padded-t-0 aui-padded-b-0">
                            <div class="aui-info-item" name="time">{{mynew.time|date:"Y-m-d H:i"}}</div>
                            <div class="aui-info-item">
                                <i class="aui-iconfont aui-icon-comment" style="color:#4c5276">
                                <a  href="{% url 'mycampus:delete_mynew' mynew.id %}" style="color: #000">
                                删除
                                </a>
                                </i>
                            </div>
                        </div>
                    </div>
                </div>
            </li>
            </form>
            {% endif %}
        {% endfor %}
        </ul>
        
    </section>

    <!-- 研讨天地 -->
	<section class="aui-content" id="Teasingwall" >
        <div class="aui-list-item-right">我的学习贴:共{{ mylearnscount }}贴</div>
       <ul class="aui-list aui-media-list">
        {% for mylearn in mylearns %}
            {% if mylearn.images %}
            <form role="form"   method="post" enctype="multipart/form-data" >
            <li class="aui-list-item">
                <div class="aui-media-list-item-inner">
                    <div class="aui-list-item-media">
                        <img src="/static/{{mylearn.images}}">
                    </div>
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-text">
                            <div class="aui-list-item-title" style="color:#4c5276">{{mylearn.publisher}}</div>
                        </div>
                        <div class="aui-list-item-text" style="color:#333;">
                            {{mylearn.title}}
                        </div>
                        <div class="aui-info aui-font-size-12 aui-padded-t-0 aui-padded-b-0">
                            <div class="aui-info-item">{{mylearn.time|date:"Y-m-d H:i"}}</div>
                            <div class="aui-info-item">
                                <i class="aui-iconfont aui-icon-comment" style="color:#4c5276">
                                <a  href="{% url 'mycampus:delete_mylearn' mylearn.id  %}" style="color: #000">
                                删除
                                </a>
                                </i>
                            </div>
                        </div>
                    </div>
                </div>
            </li>
            </form>
            {% else %}
            <form role="form"   method="post" enctype="multipart/form-data" >
            <li class="aui-list-item">
                <div class="aui-media-list-item-inner">
                    <div class="aui-list-item-media">
                        <!-- <img src="/static/{{mylearn.images}}"> -->
                    </div>
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-text">
                            <div class="aui-list-item-title" style="color:#4c5276">{{mylearn.publisher}}</div>
                        </div>
                        <div class="aui-list-item-text" style="color:#333;">
                            {{mylearn.title}}
                        </div>
                        <div class="aui-info aui-font-size-12 aui-padded-t-0 aui-padded-b-0">
                            <div class="aui-info-item">{{mylearn.time|date:"Y-m-d H:i"}}</div>
                            <div class="aui-info-item">
                                <i class="aui-iconfont aui-icon-comment" style="color:#4c5276">
                                <a  href="{% url 'mycampus:delete_mylearn' mylearn.id  %}" style="color: #000">
                                删除
                                </a>
                                </i>
                            </div>
                        </div>
                    </div>
                </div>
            </li>
            </form>
            {% endif %}
        {% endfor %}
        </ul>

    </section>

	<!-- 发表弹出框 -->
    <div class="hw-overlay" id="hw-layer"> 
        <div class="hw-layer-wrap"> 
            <div class="aui-card-list">
                <form role="form" id="form1"  method="post" enctype="multipart/form-data">
                    {% csrf_token %}
                    <div class="aui-card-list-header">
                            
                            
                        <input type="file" name="image" onchange="imgPreview(this)" />
                    </div>
                    
                    <div class="aui-card-list-content-padded">
                        <img id="preview" /><br/>
                        <textarea id="tosb" placeholder="写给..." name="tosb" onblur="return cheack_title()"></textarea>
                        <!-- </span><span id="erroretitle" style="display:none;color:red;">标题不能为空！</span> -->
                        <textarea id="content" placeholder="想说的话..." name="content"></textarea>
                        </span><span id="errorcontent" style="display:none;color:red;">内容不能为空！</span>
                        <textarea id="fromsb" placeholder="from..." name="fromsb"></textarea>
                        <li class="aui-list-item aui-pull-left ">
				            <div class="aui-list-item-inner">
				                <label><input onclick="optlovewall()" class="aui-radio" type="radio" name="radio2" checked>表白墙</label>
				                <label><input  onclick="optteasingwall()" class="aui-radio" type="radio" name="radio2" >吐槽墙</label>
				            </div>
				        </li>
                    
                    <div class="aui-card-list-footer aui-pull-right">
                        <button onclick="result()" type="submit" type="button" class="aui-btn aui-btn-info  hwLayer-ok" >发表</button>
                        <!-- <button class="btn btn-success hwLayer-ok">确 定</button>  -->
                        <!-- <button class="aui-btn aui-btn-primary hwLayer-cancel">取 消</button>  -->
                    </div>
                </from>
            </div> 
        </div> 
    </div> 

	<script type="text/javascript" src="/static/js/jquery-2.1.1.min.js"></script>
	<script type="text/javascript" src="/static/js/api.js"></script>
	<script type="text/javascript" src="/static/js/aui-tab.js"></script>
    <script type="text/javascript">
        apiready = function(){
                if(api.systemType == 'ios'){
                    scaleEnabled = true;
                    // document.getElementById('header').style.paddingTop = '10px';
                }
                //支持沉浸式效果
                if (!api.statusBarAppearance) {
                   document.getElementById('header').style.paddingTop = '0px';
                }
            };
    </script>
	<script type="text/javascript">
	    apiready = function(){
	        api.parseTapmode();
	    }
	    var bar = document.querySelectorAll(".aui-bar-btn");
	    if(bar){
	        for(var i=0; i<bar.length;i++){
	            var d = bar[i];
	            var tab = new auiTab({
	                element:bar[i],
	                repeatClick:true
	            },function(ret){
	                if(ret.dom.parentNode.getAttribute("type") && ret.dom.parentNode.getAttribute("type")=="count"){
	                    var count = parseInt(document.getElementById("count").value);
	                    if(ret.index==2)return;
	                    if(ret.index==1){
	                        document.getElementById("count").value = count-1;
	                    }
	                    if(ret.index==3){
	                        document.getElementById("count").value = count+1;
	                    }
	                }
	            });

	        }
	    }
	</script>
	<script type="text/javascript">
			function lovewall(){
               
			}
	</script>
    <script type="text/javascript">  
          
            function deletemypostnew(){
                alert("删除该条新闻？");
            }
            function deletemypostlearn(){
                alert("删除该条研讨？");
            }
	</script>
   


<!--     <script type="text/javascript">
        apiready = function(){
            if(api.systemType == 'ios'){
                scaleEnabled = true;
                document.getElementById('wrap').style.paddingTop = '12px';
            }
            };
    </script> -->

	<script type="text/javascript" src="/static/js/newcommon.js"></script> 

</body>
</html>